(function($) {
	$.ReplaceIpdk = {
			replaceIpdk : function(result,param){
				var ipdk = new RegExp("http[s|\\:][^>]*ydzg_pz\\/");
				while(ipdk.test(result)){
					var oldIpdk = result.match(ipdk);
					result = result.replace(oldIpdk,param);
				}
				return result;
			}
			,replaceBgIpdk : function(result,param){
				
				result = result.split("url('");
				result = result.join("url('" + param);
				var ipdk = new RegExp("http[s|\\:][^>]*ydzg_pz\\/");
				while(ipdk.test(result)){
					var oldIpdk = result.match(ipdk);
					result = result.replace(oldIpdk,"");
				}
				
				return result;
			}
			,replaceBgImg : function(result,param){
				var reg = "";
				if("&quot;"==param){
					reg = "\\&quot\\;";
				}else if("\""==param){
					reg = "\\\"";
				}
				var background = new RegExp("background-image\\s*\\:\\s*url\\("+reg+"\\#ipdk\\#[a-zA-Z0-9\\/_\\-\\.]*"+reg+"\\)\\;");
				while(background.test(result)){
					var backgroundImg = result.match(background);
					var bImg = backgroundImg[0].replace(param,"'").replace(param,"'");
					result = result.replace(backgroundImg[0],bImg);
				}
				return result;
			}
	}
})(jQuery);